﻿using System;
using System.Windows;
using System.Windows.Data;

using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Editors.Settings;
using DevExpress.Xpf.Grid.LookUp;

using Microsoft.SharePoint.Client;

namespace SBPweb.Sharepoint.Client.Controls.Users
{

    public partial class UserTagEditor : ComboBoxEdit
    {

        public UserTagEditor()
            : base()
        {
            InitializeComponent();
        }

        protected override void OnLoaded()
        {
            base.OnLoaded();
            //Binding binding = new Binding();
            //binding.Mode = BindingMode.OneWay;
            //binding.Path = new PropertyPath(ComboBoxEdit.DisplayMemberProperty);
            //binding.Source = this;
            //SetBinding(ComboBoxEdit.DisplayTextProperty, binding);
        }

    }

    //public class UserNameConverter : IValueConverter
    //{

    //    public string Attribute
    //    {
    //        get;
    //        set;
    //    }
        
    //    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    //    {
    //        FieldUserValue fuv = value as FieldUserValue;
    //        if (fuv != null)
    //        {
    //            if (string.IsNullOrEmpty(parameter as string))
    //            {
    //                parameter = Attribute;
    //            }
    //            switch (parameter as string)
    //            {
    //                default:
    //                    break;
    //                case "LookupId":
    //                    return fuv.LookupId;
    //                case "LookupValue":
    //                    return fuv.LookupValue;
    //            }
    //        }
    //        return null;
    //    }

    //    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    //    {
    //        return null;
    //    }

    //}


}
